package com.joker.yuwu;

import com.joker.repository.RootdelZw;
import com.joker.repository.UserDelZg;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/rootdelzw")
public class RootDelZw extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        super.doGet(req, resp);
        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/json; charset=utf-8");
        String user=req.getParameter("username");
//        获取用户名
        String zwname=req.getParameter("zwname");
//        获取展馆名
        RootdelZw u1=new RootdelZw();
        int i= u1.show(zwname,user);
        resp.sendRedirect("/admin/zwdesign.html");
    }


    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        super.doPost(req, resp);
    }
}
